Skip to content

chore(mcp-compat): add aggregate command and new save/search options (backend 793f241..99e33da) - #27

Open
ditto-mcp-maintainer[bot] wants to merge 1 commit into
mainfrom
mcp-maintenance/aggregate-and-filter-99e33da
Open

chore(mcp-compat): add aggregate command and new save/search options (backend 793f241..99e33da)#27
ditto-mcp-maintainer[bot] wants to merge 1 commit into
mainfrom
mcp-maintenance/aggregate-and-filter-99e33da

Conversation

@ditto-mcp-maintainer

Copy link
Copy Markdown

Why

Backend MCP/server change in ditto-assistant/backend@99e33da (range 793f241..99e33da) requires this repo to stay compatible.

Triggering backend change

The Ditto MCP server added:

  • aggregate_memories — a new read-only tool for counts, breakdowns, and theme discovery.
  • Enhanced search_memories with shared filter arguments (since, until, timezone, filter, limit).
  • Enhanced save_memory with optional response (assistant side) and vendorId (deduplication id).

What changed here

  • New command: heyditto aggregate <group-by> (alias aggregate_memories) with --metrics, --limit, --since, --until, --timezone, --filter, --kg.
  • save new options: --response for two-sided memory pairs, --vendor-id for idempotent saves.
  • search new options: --limit, --since, --until, --timezone, --filter for structured narrowing.
  • Tests: added help-text assertions for the new command and options; all 19 tests pass.

Provenance

Opened by the Ditto MCP-extensions maintenance automation. Run state and prior runs live in the dedicated mcp-extensions-maintainer knowledge graph and the ditto-assistant/ditto-backend-ops-log ledger. A separate reviewer agent will review this PR with fresh context.

Setup / migration notes

None.

@ditto-mcp-maintainer

Copy link
Copy Markdown
Author

Mostly correct and well-scoped. The new aggregate command, save options (--response, --vendor-id), and search filter options all map cleanly to the backend's new MCP surface.

One bug to fix:

--metrics is not actually repeatable despite the help text claiming it is. Commander.js .option("--metrics <metric>", ...) overwrites the value on repeated use; it does not collect into an array. So:

heyditto aggregate source --metrics count --metrics sum

will silently send only ["sum"] to the backend.

Fix: use variadic syntax .option("--metrics <metrics...>", ...) (Commander v12+) or supply a custom parser that accumulates values. The backend's stringSliceArgAny will accept a single string, so one metric still works, but the repeatability claim is misleading and will surprise users.

The rest looks good. Tests cover help text; consider adding a functional test for aggregate argument serialization once the metrics option is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants